package com.zr.gdms.serviceimpl;

import com.zr.gdms.dao.ScoreDao;
import com.zr.gdms.daoimpl.ScoreDaoImpl;
import com.zr.gdms.service.ScoreService;

import net.sf.json.JSONObject;
/**
 * 成绩服务层实现
 * @author 李培宁
 *
 */
public class ScoreServiceImpl implements ScoreService{

	ScoreDao sdao = new ScoreDaoImpl();
	@Override
	public JSONObject findScore(int page,int rows) {
		JSONObject jo = new JSONObject();
		jo.put("total", sdao.getScoreCount());
		jo.put("rows", sdao.getScores(page, rows));
		return jo;
	}
	@Override
	public JSONObject searchScore(int page, int rows, int score1, int score2) {
		JSONObject jo = new JSONObject();
		jo.put("total", sdao.getScoreCount());
		jo.put("rows", sdao.searchScore(page, rows, score1, score2));
		return jo;
	}

}
